import {get, post, del, put} from "@/apis/http/request";
import {${entityName}} from "@/apis/model/${lastPackageName}/${entityName}Model";

/**
* 得到列表
* @param params
*/
export const get${entityName}List = (params: any) => get("/${lowerEntityName}/list", params)

/**
* 得到分页列表
* @param params
*/
export const ${lowerEntityName}Page = (params: any) => post("/${lowerEntityName}/page", params)

/**
* 删除数据
* @param id
* @returns
*/
export const delete${entityName}ById = (id: number) => del("/${lowerEntityName}/delete/"+ id)

/**
* 新增数据
* @param param
*/
export const insert${entityName} = (param: ${entityName}) => post("/${lowerEntityName}", param)

/**
* 更新数据
* @param param
*/
export const update${entityName} = (param: ${entityName}) => put("/${lowerEntityName}", param)